package regexobject;
import ooday04.Dog;
import java.util.regex.Pattern;

public class MatchesDemo {
    public static void main(String[] args) {
// ^[a-zA-Z0-9]{1,}@[a-zA-Z0-9]+(\.[a-zA-Z]+)+$
        //sdfsdf@fs.com
// \w+@\w+(\.)

        String regex="^[a-zA-Z0-9]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+$";
        String eamil="sdgsdd@1984.com";
        String c="\\w+@\\w+(\\.)";
        boolean p =eamil.matches(regex);
        boolean  p2=Pattern.matches(regex,eamil);
        System.out.println(p2);
        Object ob=new Dog(33,"s","");
        System.out.println(ob.toString());
        boolean b3=Pattern.matches("&\\*","&*");
        System.out.println(b3);
    }
}
